
#include "batt_grade_pro.h"
//#include "CW2215B_driver.h"

#include "mystruct.h"
#include "mydefine.h"
#include "bsp_uart.h"
#include "bsp_gpio.h"
#include "apm32f0xx_gpio.h"
#include "bsp_adc.h"
#include "key.h"
#include "i2c_select.h"
#include "systick.h"
//#include "sgm415xx.h"
#include "LED_display.h"



BATType 		BATT =
{
    0
};



void dec_reset_sgm415xx_time(void)
{
    uint8_t 		i	= 0;

    for (i = 0; i < 8; i++)
    {
        if (USER.reset_sgm415xx_batt_t[i])
            USER.reset_sgm415xx_batt_t[i] --;
    }

}

BattGrageType batt_grade_check(uint16_t cap)
{
    BattGrageType	ret = WH_Low;

    if (cap < 40)
        ret = WH_Low;
    else if (cap < 80)
        ret = WH_Med;
    else if (cap < 100)
        ret = WH_High;
    else
        ret = WH_FULL;

    return ret;
}










